<template>
	<view class="card">
		<card-item :cardList="allDatas"></card-item>
	</view>
</template>

<script>
	import allData from '@/components/json/alldata.json'
	import cardItem from '@/components/cardItem.vue'
	export default{
		components:{
			cardItem
		},
		computed:{
			allDatas(){
				let allDatas = [], arr1 = [], arr2 = []
				allData.filter(item=>{
					item.oneData.filter(item1=>{
						arr1.push(item1)
					})
					item.twoData.filter(item2=>{
						arr2.push(item2)
					})
				})
				allDatas = [...arr1,...arr2]
				this.$store.state.a.allData = allDatas
				return allDatas
			}
		}
	}
</script>

<style lang='scss'>

</style>
